
document.body.onload = game;
var ctx1,ctx2;
var lasttime,deltatime;

function game(){
	init();
	lasttime = Date.now();
	gameloop();
};

function init(){
	var can1 = document.getElementById("canvas1"); 
		ctx1 = can1.getContext('2d');
	var can2 = document.getElementById("canvas2");
		ctx2 = can2.getContext('2d'); 
}

function gameloop(){
	requestAnimationFrame(gameloop);
	console.log('loop');

	var now = Date.now();
	deltatime = now-lasttime
	console.log(deltatime)
	lasttime = now;
}

function drawbackground(){
	ctx2.drawIm
}
